import Vue from 'vue'
import VueRouter from 'vue-router'
// import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    psth:'/login',
    name:'Login',
    component:()=>import('../Views/Login.vue')
  },
  {
    psth:'/register',
    name:'Register',
    component:()=>import('../Views/Register.vue')
  },
  {
    psth:'/',
    name:'Layout',
    redirect:'/article',
    component:()=>import('../Views/Layout.vue'),
    chirldren:[
      {
        path:'/article',
        name:'Article',
        component:()=>import('../Views/Article.vue')
      },
      {
        path:'/collect',
        name:'Collect',
        component:()=>import('../Views/Collect.vue')
      },
      {
        path:'/like',
        name:'Like',
        component:()=>import('../Views/Like.vue')
      },
      {
        path:'/my',
        name:'My',
        component:()=>import('../Views/My.vue')
      },
    ]
  },
  // {
  //   path: '/',
  //   name: 'Home',
  //   component: Home
  // },
  // {
  //   path: '/about',
  //   name: 'About',
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  // }
]

const router = new VueRouter({
  routes
})

export default router
